<fieldset>
		<legend>SUPPRESSION DE DIAPOSITIVES</legend>
<?php 
require_once ('../../connexion.php');
if (isset($_POST['actusBox'])){
	$error=0;
	foreach($_POST['actusBox'] as $valeur)
	{
		try{
			$sql='DELETE FROM diapositives WHERE id=:valeur';
			$delete = $connection->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
			$delete->execute(array(':valeur' => $valeur));
	 	}catch(Exception $e){
	 		$error++;
	 	}
	}
	if ($error==0){
		echo "<h3>Suppression effectuée !</h3>";
	}else{
		echo "<h3>".$error." erreur(s) survenue(s) lors de la suppression</h3>";
	}
	
}else{
	echo "<h3>Aucune suppression effectuée !</h3>";
}
?>
</fieldset>

